<!DOCTYPE html>
<html>

	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>jquery each</title>
	</head>

	<body>
		某一ID下的data-id进行遍历
		<div  id="travelers3">
			<div class="layui-inline customer12" data-value="customer12" style="margin-right: 0px;">
				<a class="layui-btn layui-btn-primary">李进11(办公室)</a>
				<a href="javascript:;" class="layui-badge cancle-btn">x</a>
			</div>
			<div class="layui-inline customer11" data-value="customer11" style="margin-right: 0px;">
				<a class="layui-btn layui-btn-primary">李进10(办公室)</a>
				<a href="javascript:;" class="layui-badge cancle-btn">x</a>
			</div>
		</div>
		<div id="testDiv">
			<ul>
				<li data-id="1">1F</li>
				<li data-id="2">2F</li>
				<li data-id="3">3F</li>
				<li data-id="4">4F</li>
				<li data-id="5">5F</li>
			</ul>
		</div>
		<!-- 引入jquery -->
		<script src="http://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
		<script type="text/javascript">
			var arrli = $('#travelers3 div');
			$.each(arrli, function(index, item) {
				console.log($(item).attr("data-value"));
			})
		</script>
	</body>

</html>